package com.iamteer.servlet;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.iamteer.entity.DinnerTable;

@WebServlet("/index")
public class IndexServlet extends BaseServlet {
	private static final long serialVersionUID = 1L;
	
	public Object list(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		List<DinnerTable> list = dinnerTableService.query(0);	// 获取所有未预定餐桌
		request.setAttribute("freeTable", list);
		return request.getRequestDispatcher("/app/index.jsp");
	}
}
